import 'package:flutter_test/flutter_test.dart';
import 'package:flutter_kuafood_camera/flutter_kuafood_camera.dart';
import 'package:flutter_kuafood_camera/flutter_kuafood_camera_platform_interface.dart';
import 'package:flutter_kuafood_camera/flutter_kuafood_camera_method_channel.dart';
import 'package:plugin_platform_interface/plugin_platform_interface.dart';

class MockFlutterKuafoodCameraPlatform
    with MockPlatformInterfaceMixin
    implements FlutterKuafoodCameraPlatform {

  @override
  Future<String?> getPlatformVersion() => Future.value('42');
}

void main() {
  final FlutterKuafoodCameraPlatform initialPlatform = FlutterKuafoodCameraPlatform.instance;

  test('$MethodChannelFlutterKuafoodCamera is the default instance', () {
    expect(initialPlatform, isInstanceOf<MethodChannelFlutterKuafoodCamera>());
  });

  test('getPlatformVersion', () async {
    FlutterKuafoodCamera flutterKuafoodCameraPlugin = FlutterKuafoodCamera();
    MockFlutterKuafoodCameraPlatform fakePlatform = MockFlutterKuafoodCameraPlatform();
    FlutterKuafoodCameraPlatform.instance = fakePlatform;

    expect(await flutterKuafoodCameraPlugin.getPlatformVersion(), '42');
  });
}
